package world.ztomorrow.jzyhainan.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import world.ztomorrow.jzyhainan.common.ZtCrawler;

@RestController
@RequiredArgsConstructor
@RequestMapping("/crawler")
public class GetInfoController {

    private final ZtCrawler ztCrawler;

    @PostMapping("hainan")
    public String hainanCrawler(@RequestBody String url) {
        ztCrawler.crawler(url);
        return "ok";
    }
}
